package com.qiaofang.applet.service.member.service;

import com.qiaofang.applet.common.base.BaseService;
import com.qiaofang.applet.service.member.domain.MemberFocus;
import com.qiaofang.applet.service.member.service.dto.MemberFocusQueryDto;
import com.qiaofang.applet.service.member.service.dto.MemberFocusSimpleDto;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 会员关注服务接口
 *
 * @author daiyuxiang
 * @Time 2020-09-30
 */
public interface MemberFocusService extends BaseService<MemberFocus, String> {

    List<String> findBusinessListByParams(MemberFocusQueryDto queryDto);

    /**
     * 分页查询会员关注记录
     *
     * @param queryDto: 查询条件
     * @param pageable: 分页参数
     * @return Page<MemberFocus>: 会员关注集合
     * @author daiyuxiang
     */
    Page<MemberFocus> findBusinessListByParams(MemberFocusQueryDto queryDto, Pageable pageable);

    /**
     * 根据房源唯一UUID查询新房对象
     *
     * @param memberId: 会员ID
     * @param businessUuid: 业务UUID 对应uniqueUuid
     * @param businessType: 业务类型
     * @author daiyuxiang
     */
    void deleteByMemberIdAndBusinessUuidAndBusinessType(String memberId, String businessUuid, String businessType);

    Boolean isExistsByMemberIdAndBusinessUuid(String memberId,String businessUuid, String businessType);

    /**
     * 获取集团新增关注、粉丝数据
     * @param date
     * @param corporationCode
     * @return
     */
    Map<String, MemberFocusSimpleDto> getFocusReportData(Date date, String corporationCode);
}
